import React from 'react';
import Button,{Buttontype,ButtonSize}from './components/Button/button';
import Menu from "./components/Menu/menu"
import MenuItem from "./components/Menu/menuItem"
import SubMenu from "./components/Menu/subMenu"
import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons'
import Icon from './components/Icon/icon'


library.add(fas)//引入所有free-solid-svg-icons下图标



function App() {
  return (
    <div className="App">
      <header className="App-header">

        <Icon icon='coffee' theme='danger' size='2x'/>

        <Menu defaultIndex='0' onSelect={(index2)=>{alert(index2)}}>
          <MenuItem>例子1</MenuItem>
          <MenuItem disabled>例子2</MenuItem>
          <SubMenu title="dropDown">
            <MenuItem>dropDown 1</MenuItem>
            <MenuItem>dropDown 2</MenuItem>
          </SubMenu>
          <MenuItem >例子3</MenuItem>
        </Menu>

        <Menu defaultIndex='0' onSelect={(index2)=>{alert(index2)}} mode="vertical">
          <MenuItem >例子1</MenuItem>
          <MenuItem disabled>例子2</MenuItem>
          <SubMenu title="dropDown">
            <MenuItem>dropDown 1</MenuItem>
            <MenuItem>dropDown 2</MenuItem>
          </SubMenu>
          <MenuItem >例子3</MenuItem>
        </Menu>

        <Button autoFocus>hello</Button>
        <Button disabled={true} >hello</Button>
        <Button disabled={true} btnType={Buttontype.Link} href="https://www.baidu.com">hello</Button>

        <h1>hello word</h1>
        <hr/>
        <p>
          Edit <code>src/App.tsx</code> and save to reload.
        </p>
        <a
          className="App-link"
          href="https://reactjs.org"
          target="_blank"
          rel="noopener noreferrer"
        >
          Learn React
        </a>
      </header>
    </div>
  );
}

export default App;
